package com.briup.jz.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.briup.jz.bean.AccountApplyExample;
import com.briup.jz.bean.AccountCustomer;
import com.briup.jz.bean.AccountCustomerExample;
import com.briup.jz.dao.AccountCustomerMapper;
import com.briup.jz.service.IAccountCustomerService;
@Service
public class AccountCustomerServiceImpl implements IAccountCustomerService{

	@Autowired
	private AccountCustomerMapper accountcustomermapper;
	public List<AccountCustomer> selectByExample(AccountApplyExample example) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String deleteByPrimaryKey(Long id) {
		accountcustomermapper.deleteByPrimaryKey(id);
		return null;
	}

	@Override
	public AccountCustomer selectByPrimaryKey(Long id) {
		return accountcustomermapper.selectByPrimaryKey(id);
	}

	@Override
	public void saveOrUpdate(AccountCustomer accountcustomer) {
		// TODO Auto-generated method stub
		if(accountcustomer.getId()!=null) {
			accountcustomermapper.updateByPrimaryKey(accountcustomer);}
		else {
			accountcustomermapper.insert(accountcustomer);
		}
		
	}

	@Override
	public List<AccountCustomer> selectByExample(AccountCustomerExample example) {
		return accountcustomermapper.selectByExample(example);
	}

}
